﻿import request from '/@/utils/request';
enum Api {
  AddTunnel = '/api/tunnel/add',
  DeleteTunnel = '/api/tunnel/delete',
  UpdateTunnel = '/api/tunnel/update',
  PageTunnel = '/api/tunnel/page',
  DetailTunnel = '/api/tunnel/detail',
}

// 增加隧道
export const addTunnel = (params?: any) =>
	request({
		url: Api.AddTunnel,
		method: 'post',
		data: params,
	});

// 删除隧道
export const deleteTunnel = (params?: any) => 
	request({
			url: Api.DeleteTunnel,
			method: 'post',
			data: params,
		});

// 编辑隧道
export const updateTunnel = (params?: any) => 
	request({
			url: Api.UpdateTunnel,
			method: 'post',
			data: params,
		});

// 分页查询隧道
export const pageTunnel = (params?: any) => 
	request({
			url: Api.PageTunnel,
			method: 'post',
			data: params,
		});

// 详情隧道
export const detailTunnel = (id: any) => 
	request({
			url: Api.DetailTunnel,
			method: 'get',
			data: { id },
		});


